3.1.45 \(\int \frac {\log (1+\frac {b}{x})}{x} \, dx\) [45]

3.1.45.1 Optimal result
3.1.45.2 Mathematica [B] (verified)
3.1.45.3 Rubi [A] (verified)
3.1.45.4 Maple [A] (verified)
3.1.45.5 Fricas [A] (verification not implemented)
3.1.45.6 Sympy [C] (verification not implemented)
3.1.45.7 Maxima [B] (verification not implemented)
3.1.45.8 Giac [B] (verification not implemented)
3.1.45.9 Mupad [B] (verification not implemented)

3.1.45.1 Optimal result

Integrand size = 12, antiderivative size = 8 \[ \int \frac {\log \left (1+\frac {b}{x}\right )}{x} \, dx=\operatorname {PolyLog}\left (2,-\frac {b}{x}\right ) \]

output
polylog(2,-b/x)
 
3.1.45.2 Mathematica [B] (verified)

Leaf count is larger than twice the leaf count of optimal. \(34\) vs. \(2(8)=16\).

Time = 0.01 (sec) , antiderivative size = 34, normalized size of antiderivative = 4.25 \[ \int \frac {\log \left (1+\frac {b}{x}\right )}{x} \, dx=-\log \left (-\frac {b}{x}\right ) \log \left (\frac {b+x}{x}\right )-\operatorname {PolyLog}\left (2,-\frac {-b-x}{x}\right ) \]

input
Integrate[Log[1 + b/x]/x,x]
 
output
-(Log[-(b/x)]*Log[(b + x)/x]) - PolyLog[2, -((-b - x)/x)]
 
3.1.45.3 Rubi [A] (verified)

Time = 0.15 (sec) , antiderivative size = 8, normalized size of antiderivative = 1.00, number of steps used = 1, number of rules used = 1, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.083, Rules used = {2838}

Below are the steps used by Rubi to obtain the solution. The rule number used for the transformation is given above next to the arrow. The rules definitions used are listed below.

\(\displaystyle \int \frac {\log \left (\frac {b}{x}+1\right )}{x} \, dx\)

\(\Big \downarrow \) 2838

\(\displaystyle \operatorname {PolyLog}\left (2,-\frac {b}{x}\right )\)

input
Int[Log[1 + b/x]/x,x]
 
output
PolyLog[2, -(b/x)]
 

3.1.45.3.1 Defintions of rubi rules used

rule 2838
Int[Log[(c_.)*((d_) + (e_.)*(x_)^(n_.))]/(x_), x_Symbol] :> Simp[-PolyLog[2 
, (-c)*e*x^n]/n, x] /; FreeQ[{c, d, e, n}, x] && EqQ[c*d, 1]
 
3.1.45.4 Maple [A] (verified)

Time = 0.29 (sec) , antiderivative size = 9, normalized size of antiderivative = 1.12

method result size
derivativedivides \(\operatorname {dilog}\left (1+\frac {b}{x}\right )\) \(9\)
default \(\operatorname {dilog}\left (1+\frac {b}{x}\right )\) \(9\)
risch \(\operatorname {dilog}\left (1+\frac {b}{x}\right )\) \(9\)
parts \(\ln \left (1+\frac {b}{x}\right ) \ln \left (x \right )+b \left (\frac {\ln \left (x \right )^{2}}{2 b}-\frac {\operatorname {dilog}\left (\frac {x +b}{b}\right )+\ln \left (x \right ) \ln \left (\frac {x +b}{b}\right )}{b}\right )\) \(50\)

input
int(ln(1+b/x)/x,x,method=_RETURNVERBOSE)
 
output
dilog(1+b/x)
 
3.1.45.5 Fricas [A] (verification not implemented)

Time = 0.32 (sec) , antiderivative size = 11, normalized size of antiderivative = 1.38 \[ \int \frac {\log \left (1+\frac {b}{x}\right )}{x} \, dx={\rm Li}_2\left (-\frac {b + x}{x} + 1\right ) \]

input
integrate(log(1+b/x)/x,x, algorithm="fricas")
 
output
dilog(-(b + x)/x + 1)
 
3.1.45.6 Sympy [C] (verification not implemented)

Result contains complex when optimal does not.

Time = 1.52 (sec) , antiderivative size = 8, normalized size of antiderivative = 1.00 \[ \int \frac {\log \left (1+\frac {b}{x}\right )}{x} \, dx=\operatorname {Li}_{2}\left (\frac {b e^{i \pi }}{x}\right ) \]

input
integrate(ln(1+b/x)/x,x)
 
output
polylog(2, b*exp_polar(I*pi)/x)
 
3.1.45.7 Maxima [B] (verification not implemented)

Leaf count of result is larger than twice the leaf count of optimal. 35 vs. \(2 (7) = 14\).

Time = 0.20 (sec) , antiderivative size = 35, normalized size of antiderivative = 4.38 \[ \int \frac {\log \left (1+\frac {b}{x}\right )}{x} \, dx=\log \left (b + x\right ) \log \left (x\right ) - \frac {1}{2} \, \log \left (x\right )^{2} - \log \left (x\right ) \log \left (\frac {x}{b} + 1\right ) - {\rm Li}_2\left (-\frac {x}{b}\right ) \]

input
integrate(log(1+b/x)/x,x, algorithm="maxima")
 
output
log(b + x)*log(x) - 1/2*log(x)^2 - log(x)*log(x/b + 1) - dilog(-x/b)
 
3.1.45.8 Giac [B] (verification not implemented)

Leaf count of result is larger than twice the leaf count of optimal. 110 vs. \(2 (7) = 14\).

Time = 0.45 (sec) , antiderivative size = 110, normalized size of antiderivative = 13.75 \[ \int \frac {\log \left (1+\frac {b}{x}\right )}{x} \, dx=-\frac {b^{3} {\left (\frac {1}{\frac {b + x}{x} - 1} - \log \left (\frac {{\left | b + x \right |}}{{\left | x \right |}}\right ) + \log \left ({\left | \frac {b + x}{x} - 1 \right |}\right )\right )} + \frac {b^{3} \log \left (-b {\left (\frac {{\left (b - \frac {1}{\frac {1}{b} - \frac {b + x}{b x}}\right )} {\left (\frac {1}{b} - \frac {b + x}{b x}\right )}}{b} + \frac {1}{b}\right )} + 1\right )}{{\left (\frac {b + x}{x} - 1\right )}^{2}}}{2 \, b^{2}} \]

input
integrate(log(1+b/x)/x,x, algorithm="giac")
 
output
-1/2*(b^3*(1/((b + x)/x - 1) - log(abs(b + x)/abs(x)) + log(abs((b + x)/x 
- 1))) + b^3*log(-b*((b - 1/(1/b - (b + x)/(b*x)))*(1/b - (b + x)/(b*x))/b 
 + 1/b) + 1)/((b + x)/x - 1)^2)/b^2
 
3.1.45.9 Mupad [B] (verification not implemented)

Time = 1.44 (sec) , antiderivative size = 8, normalized size of antiderivative = 1.00 \[ \int \frac {\log \left (1+\frac {b}{x}\right )}{x} \, dx=\mathrm {polylog}\left (2,-\frac {b}{x}\right ) \]

input
int(log(b/x + 1)/x,x)
 
output
polylog(2, -b/x)